package com.example.messagequeue.mqclient;

import lombok.Data;

import java.io.IOException;

@Data
public class ConnectionFactory {
    //服务器地址;
    private String host;
    //要用到的端口号
    private int port;

    public Connection newConnection() throws IOException {
        Connection connection = new Connection(host, port);
        return connection;
    }
}
